import axios from "axios";

const reqBalance = async (id) => {
  try {
    const response = await axios.post(
      process.env.url_server + "/api/user/balance",
      {
        id: id,
      }
    );
    return response.data;
  } catch (error) {
    alert(error);
  }
};

const reqTransactionList = async (id) => {
  try {
    const response = await axios.post(
      process.env.url_server + "/api/user/listTrans",
      {
        id: id,
      }
    );
    return response.data;
  } catch (error) {
    alert(error);
  }
};

export default {
  reqBalance,
  reqTransactionList,
};
